#encoing=utf-8


class Loop(object):
	_instance = None

	@classmethod
	def instance(cls):
		if cls._instance is None:
			cls._instance = Loop()
			return cls._instance
		else:
			return cls._instance
	'''
	def __new__(cls):
		if Loop._instance:
			print "instance have been create"
			return Loop._instance
		else:
			Loop._instance = super(Loop,cls).__new__(cls)
			return Loop._instance
	'''

	def __init__(self):
		print 'i.....'


if __name__ == "__main__":
	'''
	o = Loop.instance()
	o2 = Loop.instance()

	print o
	print o2
	'''
	import socket
	s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	s.connect(('', 8080))
	a = input('input ...')
	s.sendall(a)
